import React from 'react'
import ReactDOM from 'react-dom'
import { Router, Route, Link } from 'react-router'
import cx from 'classnames'
import styles from './footer.css'

class Footer extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
            wechat_up: false
        }
    }
    wechat_change() {
        var status = this.state.wechat_up
        this.setState({wechat_up: !status})
    }
    render() {
        return (
            <div id={styles.root}>
                <div className="ui container">
                    <div className={styles.us}>
                        <ul>
                            <li><a href="/">首页</a></li>
                            <li><a href="/about">关于 Swallow</a></li>
                            <li><a href="/terms">服务条款</a></li>
                            <li><a href="/privacy">隐私策略</a></li>
                            <li><a href="/help">帮助</a></li>
                            <li><a href="https://blog.coding.net/">Blog</a></li>
                            <li><a href="/app">App</a></li>
                        </ul>
                        <p>
                            Copyright&nbsp;&nbsp;©&nbsp;2016&nbsp;swallow.com&nbsp;&nbsp;
                            <a href="http://www.miitbeian.gov.cn/">苏ICP备14029750号-1</a>
                        </p>
                    </div>
                    <div className={styles.share}>
                        <div className={styles.weixin}>
                            <a href="javascript:;" className={styles.line_right} onClick={::this.wechat_change}><i className="wechat icon" /> WeChat</a>
                            <div className={this.state.wechat_up? "ui visible popup " + styles.popup: "ui popup "+ styles.popup}>
                                <img src="https://coding.net/static/fcdf6ecd90f6022d143a5e06fbe391b8.jpg" />
                            </div>
                        </div>
                        <a className={styles.line_right} href="#"><i className="weibo icon" /> Weibo</a>
                        <a href="mailto:support@zhiyan.io"><i className="mail outline icon" /> Mail</a>
                    </div>
                </div>
            </div>
        );
    }
}

export default Footer
